package selef.xiafan.entity.order;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author xiafan
 * @version 1.0
 * @date 2021/7/27 16:18
 */
@Data
@Entity
@Table(name = "t_order_item")
@JsonIgnoreProperties({"handler", "hibernateLazyInitializer"})
public class OrderItem implements Serializable {
    @Id
    @Column(name = "order_item_id")
    private String orderItemId;

    @Column(name = "order_id")
    private String orderId;

    @Column(name = "stock_id")
    private String stockId;

    @Column(name = "stock_num")
    private Integer stockNum;

    private String description;

    @Transient
    private String stockName;

    @Transient
    private BigDecimal price; // 单个服务金额

    @Transient
    private BigDecimal totalPrice; // 总金额

}
